home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / __SELECT.HDR < prev    next >
Text File  |  1994-04-25  |  2KB  |  73 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _Select( xSelectArea ) --> lSelectStatus
  8.  
  9. PARAMETERS:
  10.  
  11. xSelectArea
  12.  
  13. SHORT:
  14.  
  15. Select a work area by number or alias.
  16.  
  17. DESCRIPTION:
  18.  
  19. _Select() is a general purpose work area selector.  It selects a work
  20. area either by work area ALIAS (character argument), or by work area
  21. number (numeric argument).
  22.  
  23. Optionally, _Select() can be used to CLOSE a work are by calling
  24. _Select() with no parameters, however, this is not recommended as it leads
  25. to poor and evem misleading readability.
  26.  
  27. The function is useful because the way that Clipper evaluates
  28. character expressions is different from the way it evaluates
  29. numeric expressions.  Character expressions can be evaluated, even
  30. from character variables with no parenthesis.  Numeric expressions
  31. however must be evaluated inside parenthesis.
  32.  
  33. _Select() negates the need to determine which format to use. Simply pass
  34. the argument to the _Select() function, and it will evaluate the
  35. expression correctly depending upon the expression type.
  36.  
  37. _Select() returns a logical value indicating .T. if no error occured, or
  38. .F. if an error did occur.
  39.  
  40. NOTE:
  41.  
  42. The file name is __select.prg to avoid conflict with the Clipper SELECT
  43. command.
  44.  
  45.  
  46.  
  47. EXAMPLE:
  48.  
  49. SELECT 1
  50. USE bufget INDEX budget ALIAS BudgetFile
  51.  
  52. t = "BudgetFile"
  53. u = 1
  54.  
  55. _Select(t)
  56. _Select(u)
  57. _Select('BudgetFile')
  58.  
  59. Result: All three function calls accomplish the same thing. They ALL
  60. select the Budget File work area.
  61.  
  62. SELECT 1
  63. USE bufget INDEX budget ALIAS BudgetFile
  64.  
  65. ...
  66. ...
  67.  
  68. _Select()
  69.  
  70. Result: The work area/Database File (and Indexes) is closed
  71.  
  72. ******************************************************************************/
  73.